package org.lemon.cla.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.lemon.cla.enums.ClubApplicationStatusEnum; // 导入社团申请状态枚举

import java.time.LocalDateTime;

@Data
@TableName("club_application")
@Schema(description = "社团申请实体")
public class ClubApplication {

    @TableId(value = "application_id", type = IdType.AUTO)
    @Schema(description = "申请ID", example = "1")
    private Long applicationId;

    @TableField("user_id")
    @Schema(description = "申请人用户ID (外键，关联用户表)", example = "1")
    private Long userId;

    @TableField("club_id")
    @Schema(description = "申请社团ID (外键，关联社团表)", example = "1")
    private Long clubId;

    @TableField("application_time")
    @Schema(description = "申请时间", example = "2024-06-22T10:00:00")
    private LocalDateTime applicationTime;

    @Schema(description = "申请理由", example = "热爱编程，希望加入社团学习交流。")
    private String reason;

    @Schema(description = "申请状态", example = "待审核", allowableValues = {"待审核", "已批准", "已拒绝"})
    private ClubApplicationStatusEnum status;

    @TableField("review_time")
    @Schema(description = "审核时间", example = "2024-06-23T15:00:00")
    private LocalDateTime reviewTime;

    @TableField("reviewer_id")
    @Schema(description = "审核人ID (外键，关联管理员用户)", example = "101")
    private Long reviewerId;
}